<!--
 * @FilePath     : /study_code/layui/5-4.html
 * @Description  : 使用 自定义扩展的模块
 * @Date         : 2025-04-08 16:00:42
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-08 16:04:51
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="/layui/dist/css/layui.css" />
  </head>
  <body>
    <h2>layui根文件</h2>

    <script src="/layui/dist/layui.js"></script>
    <script>
      layui
        .config({
          base: '/layui/extends_modules/',
        })
        .extend({
          firstMod: 'first_mod',
        })
        .use(['firstMod'], function () {
          var firstMod = layui.firstMod
          console.log('扩展模块', layui)
          firstMod.hello('World')
        })
    </script>
  </body>
</html>
